Repository navigation
fix(watchdog): re-escalate at the second threshold instead of deduping into silence (#10630) - #12965
Merged
Merged
Conversation
…g into silence (#10630) A confirmed rung-4 hand-off deduped forever: if the repair task was never picked up, the incident issue went quiet and only the 24h surfacing log line ever fired. planEscalation now takes the tick clock and, once a fully confirmed hand-off has been unresolved for ESCALATION_REPEAT_AFTER_MS (24h, the second threshold), plans a single re-escalation comment on the EXISTING incident issue — no new issue, no new task — flagged reEscalated so the entry point stamps it via the new recordReEscalation. The stamp (lastReEscalatedAt on EscalationRecord, preserved by coerceHealth) restarts the window, so re-escalation fires once per window while the source stays down. Oracle: #10630 acceptance 3 (dead scrape, repair task ignored, escalation re-fires at the second threshold) + the #6033 dedupe contract. 7 new tests in watchdog-escalation.test.ts; all 46 tests across the three watchdog suites pass.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Next slice of #10630 (does NOT close it): the code-owned watchdog half of acceptance criterion 3 — "simulated dead scrape with repair task ignored: escalation re-fires at the second threshold."
Before: a confirmed rung-4 hand-off deduped forever. If nobody picked up the repair task, the incident issue went silent; the only second-threshold artifact was the NEEDS DREW log line from
surfacingLine.Now:
planEscalation(health, ctx, nowMs?)— with a clock, a fully confirmed hand-off that has been unresolved forESCALATION_REPEAT_AFTER_MS(24h, matching the surfacing threshold) plans exactly onecomment_issueon the existing incident issue ("Still unresolved … repair task remains the work item"). No new issue, no new task — the update lands on the existing escalation, per (source, failure class).reEscalated; the watchdog entry point stamps it via the newrecordReEscalationonce the comment confirms. The stamp (lastReEscalatedAtonEscalationRecord, preserved bycoerceHealth, including on displacedpreviousrecords) restarts the window: one re-escalation per window, never one per tick, and never silence.Verification (laptop worktree off origin/main):
bun testoverwatchdog-escalation.test.ts+watchdog-state.test.ts+watchdog.test.ts— 46 pass / 0 fail, including 7 new tests whose oracle is #10630 acceptance 3 (dedupe before the window, single comment at the threshold, per-window repeat, displaced-record stamping, coercion round-trip).Remaining on #10630: the CDP wedge probe and the Mistral gatherer failure classification (session-expired vs cdp-unavailable) — the gatherer side is OpenChamber-side per the 2026-11-22 decision recorded on the issue, so it is not in this repo's slice.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.